import Swal from 'sweetalert2'

export default {
    show: function(title, callback) {
        Swal.fire({
            title: title,
            icon: "warning",
            buttons: ["取消", "确定"],
            dangerMode: true,
            showCancelButton: true,
            confirmButtonColor: '#d33',
            cancelButtonColor: '#3085d6',
            confirmButtonText: '删除',
            cancelButtonText: '取消'
            }).then(result => {
                if (result.isConfirmed) {
                    if(callback) {
                        callback()
                    }
                }
            })
    }
}